<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:useBean id="member" class="admin.member.MemberDao" scope="page"/>
<%@ page import="java.util.List" %>
<%@ page import="java.util.HashMap" %>
<%
	
	String id	= request.getParameter("id");
	String pwd	= request.getParameter("pwd");

	List list = member.loginOk(id,pwd);
	
	if ( list != null && list.size() > 0 ){
		
		admin.member.MemberModel model = (admin.member.MemberModel)list.get(0);
		
		session.setAttribute("id",model.getId());
		session.setAttribute("idx",model.getIdx());
		
%>
	<script type="text/javascript">
		parent.document.location.href = "/";
	</script>
<%
		
	} else {
		
%>
	<script type="text/javascript">
		alert("아이디 또는 패스워드가 틀렸습니다.");
		document.location.href = "member_login.jsp";
	</script>
<%
		
	}
	
	

%>